package cn.juque.jdfsystem.enums;

import cn.hutool.core.lang.Assert;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>RegisterExecuteStatusEnum</li>
 * </ul>
 * @date 2023-01-10 23:36:53
 **/
public enum RegisterExecuteStatusEnum {
    /**
     * enum
     */
    DOWN_LINE(0, "下线"),
    EXCEPTION(1, "异常"),
    NORMAL(2, "正常"),
    ;

    private final Integer code;

    private final String label;

    RegisterExecuteStatusEnum(Integer code, String label) {
        this.code = code;
        this.label = label;
    }

    public Integer getCode() {
        return code;
    }

    public Boolean equal(RegisterExecuteStatusEnum statusEnum1, RegisterExecuteStatusEnum statusEnum2) {
        Assert.notNull(statusEnum1);
        Assert.notNull(statusEnum2);
        return statusEnum1.getCode().equals(statusEnum2.getCode());
    }
}
